"""
@Time ： 2021/10/23 18:21
@Auth ： ChenZhangKun
"""


class MusicPlayer(object):
    def __init__(self):
        print("播放器初始化")

    def __new__(cls, *args, **kwargs):
        print("创建对象，分配空间")
        # 为对象分配空间
        instance = super().__new__(cls)
        print(instance)
        # 返回对象引用->py解释器才会调用初始化方法
        return instance


player = MusicPlayer()
player1 = MusicPlayer()

print(player is player1)